
<!-- DataTables -->
<link rel="stylesheet"
	  href="./app/lib/datatables/media/css/dataTables.bootstrap.css">

<div ng-controller="goodsspecialcontent as gt">
	<section class="content-header">
		<h1>
			{{title}}<small></small>
		</h1>
	</section>
	<section class="content">
		<div class="box box-default">
			<div class="col-md-12">
				<div class="box-body" >
					<alertdanger></alertdanger>
					<alertsuccess></alertsuccess>

					<div class="col-xs-12">
					<div class="box">
						<div class="box-header">
							<h3 class="box-title">已选货物内容</h3>
						</div><!-- /.box-header -->
						<div class="box-body table-responsive no-padding">
							<table class="table table-hover">
								<tr>
									<th>货物编号</th>
									<th>图片</th>
									<th>货物名称</th>
									<th>成本价格</th>
									<th>会员价格</th>
									<th>库存</th>
									<th>操作</th>
								</tr>
								<tr ng-repeat="at in selectedproducts track by $index">
									<td>{{at.id}}</td>
									<td><img class="img-responsive pad" style="width: 50px;height: 50px;" src="{{at.mainimg}}" alt="Photo"></td>
									<td>{{at.productname}}</td>
									<td>{{at.saleprice|currency:"¥"}}</td>
									<td>{{at.memberprice|currency:"¥"}}</td>
									<td>{{at.stock|number}}</td>
									<td><button ng-click="removeselectproduct($index);" class='btn btn-box-tool'>删除</button></td>
								</tr>

							</table>
						</div><!-- /.box-body -->
					</div><!-- /.box -->
				</div>
					<form role="form">
						<div class="box-body">
							<div class="form-group">
								<button ng-click="showsearchproduct();" class="btn btn-block btn-success btn-sm">选择专题货物</button>
							</div>
						</div>
						<div class="box-body" >
							<div class="form-group" ng-show="searchproduct">
								<div class="box box-success">
									<div class="box-header with-border">
										<h3 class="box-title">搜索货物</h3>
									</div>
									<div class="box-body">
										<div class="form-group">
											<div class="col-md-3" ng-init="findallgoodstype();">
												<label>商品类型</label> <select ng-change="goodstypechange();"
																			ng-model="selectedgoodstype"
																			ng-options="gs.name for gs in goodstypeselect"
																			class="form-control select2" style="width: 100%;">
												<option ng－value="-1">--请选择--</option>
											</select>
											</div>
											<div class="col-md-3">
												<label>货物名称</label>
												<input maxlength="20"
													   ng-model="productname" class="form-control" type="text"
													   placeholder="请输入货物名称" value="" />
											</div>
											<div class="col-md-3">
												<label>货号</label>
												<input maxlength="20"
													   ng-model="psn" class="form-control" type="text"
													   placeholder="请输入货号" value="" />
											</div>
										</div>

									</div>
									<div class="box-body">
										<div class="form-group">
											<button ng-click="searchdataTableCustom();" class="btn btn-block btn-success btn-sm">检索</button>
										</div>
									</div>



								</div>
								<div class="col-xs-12">
									<div class="box">
										<div class="box-header"></div>
										<div class="box-body" >
											<table datatable="" dt-options="gt.dtOptions"
												   dt-columns="gt.dtColumns"
												   dt-instance="gt.dtInstance"
												   class="table table-striped table-bordered"></table>
										</div>
									</div>
								</div>
							</div>
						</div>
						<div class="box-footer">
							<button ng-show="savebtn.show" type="button"
									class="btn btn-primary" ng-click="save();">保存</button>
							<button ng-show="updatebtn.show" type="button"
									class="btn btn-primary" ng-click="update();">更新</button>
						</div>
					</form>
				</div>
			</div>


			<div class="box-footer"></div>
		</div>
	</section>
</div>
